//
//  UIScrollView+IndexPath.h
//  YHSuoShi
//
//  Created by 林宁宁 on 2021/1/14.
//  Copyright © 2021 林宁宁. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIScrollView (IndexPath)

@property (copy, nonatomic) void(^scrollingBlock)(UIScrollView * scrollView);
@property (copy, nonatomic) void(^scrollEndBlock)(UIScrollView * scrollView);

- (void)yh_scrollViewDidEndDecelerating:(UIScrollView *)scrollView;
- (void)yh_scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate;
- (void)yh_scrollViewDidScroll:(UIScrollView *)scrollView;
- (void)yh_scrollViewDidEndAnimation:(UIScrollView *)scrollView;

- (NSIndexPath *)screenCenterIndexPath;
- (NSIndexPath *)screenTopIndexPath;
- (NSIndexPath *)screenBottomIndexPath;
- (NSIndexPath *)screenLeftIndexPath;

- (NSIndexPath *)firstIndexPath;

- (CGRect)yh_getRectForRowAtIndexpath:(NSIndexPath *)indexPath;

@end

NS_ASSUME_NONNULL_END
